#include <stdio.h>

struct Date {
    int year, month, day;
};
int calculate_day_of_year(struct Date d) {
    int m[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int days = 0;
    for (int i = 0; i < d.month - 1; i++) {
        days += m[i];
        if (i == 1) days += ((d.year % 4 == 0 && d.year % 100 != 0) || d.year % 400 == 0);
    }
    days += d.day;
    return days;
}

int main() {
    struct Date date;

    scanf("%d %d %d", &date.year, &date.month, &date.day);

    // 调用函数计算第几天
    int days = calculate_day_of_year(date);

    // 输出结果
    printf("%d/%d is the %dth day in %d\n", date.month, date.day, days, date.year);

    return 0;
}